<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <form th:action="@{/add_save}" method="post">
        <table border="1">
            <tr>
                <th>学生信息添加</th>
            </tr>
            <tr>
                <td>
                    用户id: <input name="id" type="text" th:value="${id}">
                </td>
            </tr>
            <tr>
                <td>
                    用户姓名: <input name="name" type="text" th:value="${name}">
                </td>
            </tr>
            <tr>
                <td>
                    用户性别: <input name="gender" type="text" th:value="${gender}">
                </td>
            </tr>
            <tr>
                <td>
                    用户年龄: <input name="age" type="text" th:value="${age}">
                </td>
            </tr>
            <tr>
                <th>
                    <input type="submit" value="保存">
                </th>
            </tr>
        </table>
    </form>
</div>
<script>
    function fun1(){
        let email=document.getElementById("email");
        let rule= "/^[1-9]{1}[0-9]{4,11}@qq.com$/";
        if(rule.text(email.value) === false){
            email.value="请输入正确的邮箱";
            email.style="color:red";
            return false;
        }else{
            return true;
        }
    }

</script>
</body>
</html>